package com.lyz.dataStructure.algorithm.pinduoduo2019;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 16:26
 * @Description:
 **/

import java.util.ArrayList;
import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/7/28 16:26
 *@Description:
 **/
public class Main4 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String  s = sc.nextLine();
        String[]  st = s.split(",");
        int[] arr = new int[st.length];
        for(int i =0;i<=arr.length-1;i++){
           arr[i] = Integer.parseInt(st[i]);

        }
        String  s1 = sc.nextLine();
        String[]  st1 = s1.split(",");
        int[] arr1 = new int[st1.length];
        for(int i =0;i<=arr.length-1;i++){
            arr1[i] = Integer.parseInt(st[i]);

        }
        int index = 0;
        for(int i =0;i<=arr.length-1;i++){
           index++;
            if(arr[i+1]<arr[i]){
                index = index;
            }
        }
        System.out.println(s);
        System.out.println(s1);
    }
}
